// 引入menu列表接口
import {
    menulist
} from '../../../request/api'
const state = {
    menuList: []
}

const getters = {
    getmenus(state) {
        return state.menuList
    }
}

const mutations = {
    setMenuList(state, plydata) {
        state.menuList = plydata
    }
}

const actions = {
    getMenuList({commit}) {
        menulist().then(res => {
            console.log(res)
            commit('setMenuList',res.list)
            
        })
    }
}

export default {
    state,
    mutations,
    actions,
    getters,
    namespaced:true
}